<script setup>
import { ref } from 'vue';
import {onLoad} from "@dcloudio/uni-app"

const searchVal=ref('')
	
//搜索事件
const onSearch=()=>{
	//发起网络请求
}



onLoad((e)=>{
	//获取页面参数
	if(e.keyword) searchVal.value=e.keyword
	//发送网络请求
	onSearch()
})
</script>


<template>
  <view class="page-wrap">
	<!--标题栏-->
     <tar-bar title="搜索"></tar-bar>
	 <!--搜索框-->
	 <search @on-confirm="onSearch" v-model:keyword="searchVal"></search>
	 <!--搜索结果-->
	 <view class="result-wrap">
		 <view class="item" v-for="item in 6" :key="item">
			 <card-goods></card-goods>
		 </view>
	 </view>
  </view>
</template>


<style lang="scss" scoped>
.page-wrap{
	.result-wrap{
		padding: 32rpx;
		display: grid;
		grid-template-columns: repeat(2,minmax(0,1fr));
		gap: 32rpx;
	}
}


</style>
